

async function main() {

    const sleep = require('../src/utils/common').sleep
    const getDevice = require('../src/utils/device').getDevice

    const device = new getDevice({
        id: 1,
        ip: '192.168.88.28',
        ssid: 'IYK_RQS568BN'
    }) // 192.168.4.1 255.255.255.255 192.168.88.28

    device.init()
    await sleep(2000)
    
    // device.shakeHand()
    // await sleep(2000)
    
    // device.setWifi('XIAOCHEN', 'xiaochen888')
    // await sleep(20000)
    
    // device.getInfo()
    // await sleep(3000)

   

    // device.setTime(new Date())
    // await sleep(3000)

    device.setBee(0)
    await sleep(6000)

    device.getBee()
    await sleep(6000)


    // 长红外
    // device.startLongRedLearn()
    // await sleep(2000)

    // device.getLongRedLearn()
    // await sleep(5000)
    // device.stopRedLearn()
    // await sleep(2000)
    
    // // 短红外
    // device.startShortRedLearn()
    // await sleep(5000)

    // device.getShortRedLearn()
    // await sleep(3000)

    

    // device.stopRedLearn()
    // await sleep(10000)

    // const code = []
    // for(let i=0;i<1024;i++) {
    //     code.push(1)
    // }
    // device.sendLongRed(code)
    // await sleep(10000)
    
    device.close()
}

main()